package com.crm.miaohe.service;

import java.util.List;

import javax.servlet.http.HttpServletResponse;

import com.crm.miaohe.controller.PageResponse;
import com.crm.miaohe.controller.order.request.OrderCustomRequest;
import com.crm.miaohe.controller.order.request.OrderDeliveryDateRequest;
import com.crm.miaohe.controller.order.request.OrderDetailsModQtyRequest;
import com.crm.miaohe.controller.order.request.OrderDetailsRequest;
import com.crm.miaohe.controller.order.request.OrderExportRequest;
import com.crm.miaohe.controller.order.request.OrderExportStatusRequest;
import com.crm.miaohe.controller.order.request.OrderFreightFeeRequest;
import com.crm.miaohe.controller.order.request.OrderMemoRequest;
import com.crm.miaohe.controller.order.request.OrderPlanRequest;
import com.crm.miaohe.controller.order.request.OrderQueryRequest;
import com.crm.miaohe.controller.order.request.OrderStatusRequest;
import com.crm.miaohe.controller.order.request.OrderWuliuRequest;
import com.crm.miaohe.entity.order.OrderEntity;
import com.crm.miaohe.entity.order.OrderFreightFeeEntity;
import com.crm.miaohe.kdcloud.api.Order;

import net.minidev.json.JSONObject;

public interface OrderService {
    void createOrder(OrderPlanRequest request);

    List<Order> queryOrderDetail(String username);

    public String queryFRECCONDITIONID (String customerNum) ;

    void auditOrder(Long orderId);

    void auditOrders(List<Long> orderIds);

    void deleteOrder(Long orderId);

    void adminDeleteOrder(Long orderId);

    void adminUpdateOrderExportStatus(OrderExportStatusRequest request);

    void adminDeleteOrderDetails(OrderDetailsRequest request);

    void adminUpdateOrderDetails(OrderDetailsRequest request);

    void updateDeliveryDate(OrderDeliveryDateRequest request);

    void updateOrderMemo(OrderMemoRequest request);

    void updateOrderWuliu(OrderWuliuRequest request);

    PageResponse<OrderEntity> getOrders(OrderQueryRequest request);

    OrderFreightFeeEntity calcFreightFee(OrderFreightFeeRequest request);

    PageResponse<OrderEntity> getCustomerOrders(OrderStatusRequest request);

    void exportCustomerOrders(OrderExportRequest request, HttpServletResponse response);

    void exportERPOrders(OrderCustomRequest request, HttpServletResponse response);

    void modOutQty(OrderDetailsModQtyRequest request, HttpServletResponse response,String direction);

    void updateStatus(String orderNo, String orderStatus);
    
    public PageResponse<Integer> checkTodayOrders(OrderPlanRequest request);
    public PageResponse<JSONObject> checkOverDeposit(OrderPlanRequest request);
}
